package com.zidongxiangxi.rabbit.starter.entity.producer;

/**
 * 顺序mq配置
 *
 * @author chenxudong
 * @date 2020/11/08
 */
public class ReliableRabbitProducerSequence {
	/**
	 * 是否启用顺序消息
	 */
	private boolean enabled = false;

	/**
	 * 顺序消息表
	 */
	private String tableName = "producer_sequence";

	/**
	 * 保留时长，单位：天
	 * 小于等于0，表示不过期
	 */
	private int retentionPeriod = 10;

	/**
	 * 每次执行定时任务，清理的数量
	 */
	private int batchSize = 20;

	/**
	 * 执行清理任务的周期，单位毫秒，默认300000
	 */
	private long workPeriod = 300000;

	public boolean isEnabled() {
		return enabled;
	}

	public void setEnabled(boolean enabled) {
		this.enabled = enabled;
	}

	public String getTableName() {
		return tableName;
	}

	public void setTableName(String tableName) {
		this.tableName = tableName;
	}

	public int getRetentionPeriod() {
		return retentionPeriod;
	}

	public void setRetentionPeriod(int retentionPeriod) {
		this.retentionPeriod = retentionPeriod;
	}

	public int getBatchSize() {
		return batchSize;
	}

	public void setBatchSize(int batchSize) {
		this.batchSize = batchSize;
	}

	public long getWorkPeriod() {
		return workPeriod;
	}

	public void setWorkPeriod(long workPeriod) {
		this.workPeriod = workPeriod;
	}
}
